<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="java.util.Date"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="com.sun.corba.se.impl.javax.rmi.CORBA.Util"%>
<%@page import="com.sun.xml.internal.bind.v2.schemagen.xmlschema.Import"%>
<%@ include file="/WEB-INF/jsp/include.jsp"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<c:set var="webctx" value="${pageContext.request.contextPath}" />
<html xmlns="http://www.w3.org/1999/xhtml" class="hb-loaded">
<head>
<meta charset="utf-8" />
<title>个人中心 - 订单中心</title>
<link href="${webctx}/resources/css/same.css?v=1.3.7.2" type="text/css"
	rel="stylesheet" />
<link href="${webctx}/resources/css/member.css?v=1.3.6.0"
	type="text/css" rel="stylesheet" />

<spring:url value="/resources/js/jquery.js" var="jquery" />
<script src="${jquery}"></script>

<spring:url value="/resources/js/index.js?virsion=1.3.7.2" var="indexJs" />
<script src="${indexJs}"></script>

<spring:url value="/resources/js/member.js" var="memberJs" />
<script src="${memberJs}"></script>

</head>
<body style="background-color: #F5F7F7;">
	<!--头部-->
	<div class="cmain" style="background-color: #F5F7F7;">
		<div class="headtop">
			<!--头部左边-->
			<div class="top-left fl">
				<a title="Du Du" href="hello2"> <img width="90px" alt="Du Du官网"
					src="${webctx}/resources/images/logo1.jpg" style="margin-top: -22px;">
				</a href="hello2"><span style="font-weight: bold; font-size: 40px;">用户中心</span>
			</div>
			<!--头部左边end-->
			<!--头部右边-->
			<div class="top-right fr">
				<!--登录注册-->
				<ul class="tright-ul fl">

					<div id="ctl00_ucheader_pllogin2">
						<li><a><span id="ctl00_ucheader_lit"><%=((jp.co.lkg.springsmp.common.db.dto.UserinfoDto)request.getSession().getAttribute("sessionUser")).getUsername() %></span></a></li>
						<li><a href="javascript:logout()" rel="nofollow">退出</a></li> 
						<input type="hidden" id="userName" value="<%=((jp.co.lkg.springsmp.common.db.dto.UserinfoDto)request.getSession().getAttribute("sessionUser")).getUsername() %>" />
					</div>
				</ul>
			</div>
			<!--头部右边end-->
		</div>
	</div>
	<!--头部end-->
	<!--导航-->
	<div class="nav">
		<div class="cmain"></div>
	</div>
	<!--导航end-->


	<script type="text/javascript">
    function logout() {
        if (window.confirm('确定退出吗？')) {

            $.get("/nAPI/QuitExit.ashx", function (data) {
                window.location.href = "/";
            });
        }
    }
</script>

	<div class="cort">

		<div class="cort">
			<div class="tobuy cmain">
				<div class="cmain mb_back">

					<div class="zbk_top spalid">
						<span id="ctl00_content_website_SiteMapPath1"><a
							href="#ctl00_content_website_SiteMapPath1_SkipLink"></a><a
							id="ctl00_content_website_SiteMapPath1_SkipLink"></a></span>
					</div>
					<div class="member_cort">

						<div class="member_cort-left fl">
							<!--我的DR-->
							<div class="member_cortleft-tittle">
								<i class="mb_home"></i><a rel="nofollow"
									href="member_index.html">我的MOUMOU</a>
							</div>
							<!--我的DR end-->
							<ul class="member_cort-ul">
								<li>
									<h3>-订单中心-</h3>
									<ul class="member_ul-dr">
										<li id="ctl00_content_ucmemberleft_order"
											class="speacil_color"><a rel="nofollow"
											href="showorder">我的订单</a></li>
										<li id="ctl00_content_ucmemberleft_ask"><a
												rel="nofollow"
												href="showprivateorder">我的定制</a></li>
								
									</ul>
								</li>
								
								<li>
									<h3>-帐户管理-</h3>
									<ul class="member_ul-dr">
										<li id="ctl00_content_ucmemberleft_myinfo"><a
											rel="nofollow"
														href="touser?username=<%=((jp.co.lkg.springsmp.common.db.dto.UserinfoDto)request.getSession().getAttribute("sessionUser")).getUsername() %>">个人信息</a></li>

										<li id="ctl00_content_ucmemberleft_password"><a
											rel="nofollow" href="pwd">修改密码</a></li>
										
									</ul>
								</li>
							</ul>
						</div>


						<!--右边的主要内容-->
						<div class="member_cort-right fr">
							<!--我的订单-->
							<div class="member_myorder">
								<!--切换nav-->
								<div class="member_all-nav">
									<div class="member_all-nav-top">
										<ul class="member_all-nav-ul fl">
											<li class="member_all-nav-click">全部订单</li>
										</ul>
										<!--右边-->
										<div class="member_all-nav-right fr">
											<i class="member_tz"></i> <span>订单如需加急处理，请及时联系</span> <a
												target="_blank" style="cursor: pointer"
												onClick="javascript:showxiaon();"> 在线客服>></a>
										</div>
										<!--右边end-->
									</div>
									<!--黄色线-->
									<div class="member_all-nav-line"></div>
									<!--黄色线end-->
								</div>
								<!--切换nav end-->
								<!--订单-->

								<div class="member_myorder-allorder">
									<div class="member_news-it">
										<table cellspacing="0" cellpadding="0" border="0"
											class="member_title-table">
											<tbody>
												<tr class="member_myorder-table-first">
													<td style="width: 230px;">订单商品</td>
													<td style="width: 220px;">订单金额</td>
													<td style="width: 120px;">已付金额</td>
													<td style="width: 120px;">订单状态</td>
													<td style="width: 150px;">操作</td>
												</tr>
											</tbody>
										</table>
										<c:forEach var="item" items="${userinfoForm.privatelist}"
											varStatus="status">
											<table cellspacing="0" cellpadding="0" border="0"
												class="member_myorder-table">

												<tbody>
													<tr class="member_myorder-table-sec">
														<td class="myorder-table-sec_td1" colspan="3">订单号：${item.privateId }</td>
														<td class="myorder-table-sec_td2" colspan="3">下单时间：${item.privateTime }</td>
													</tr>
													<tr class="member_myorder-table-third">
														<td class="myorder-table_td1">

															<div class="myorder-table-third-cp">
																<div class="img_left fl">
																	<a href="/darry_ring/87.html"> <img width="55" height="55" src="${webctx}/resources/images/private.jpg">
																	</a>
																</div>
																<div class="img_right fr">
																	<a href="/darry_ring/87.html">
																		<p>${item.privateName }</p>
																	</a>

																</div>
															</div>

														</td>
														<td class="myorder-table_td2" style="width: 190px;">
															<div
																style="height: 55px; line-height: 55px; font-family: 微软雅黑;"
																class="myorder-table-third-cp">￥${item.privateCost }
															</div>

														</td>

														<td class="myorder-table_td3" style="font-family: 微软雅黑;">￥0</td>
														<td class="myorder-table_td5">${item.privateStatus }</td>
														<td class="myorder-table_td6" style="width: 120px;">
														<c:if test="${item.privatePaystatus =='未支付'}">
																<a class="myorder-table_pay"
																	href="buyprivateorder?privateId=${item.privateId }"> 支付 </a>
															

																<p style="cursor: pointer">
																	<a onClick="cancelPrivate(${item.privateId })">取消订单</a>
																</p>
															</td>
															</c:if>
														<c:if test="${item.privatePaystatus =='支付完成'}">
														订单完成
														</c:if>
													</tr>

												</tbody>
											</table>
										</c:forEach>

									</div>

									<div style="display: none" class="member_news-it">

										<spring:url value="/resources/js/orderlist.js"
											var="orderlistJs" />
										<script src="${orderlistJs}"></script>

										<script type="text/javascript" language="javascript">
										    function cancelPrivate(privateId) {
										    	var userName = document.getElementById("userName").value;
										        if (confirm("确定要取消订单吗?")) {
										            window.location.href = "cancelprivate?privateId="+privateId+"&userName="+userName;    
										        }
										        
										    }
										</script>
										<table cellspacing="0" cellpadding="0" border="0"
											class="member_title-table">
											<tbody>
												<tr class="member_myorder-table-first">
													<td style="width: 230px;">订单商品</td>
													<td style="width: 220px;">订单金额</td>
													<td style="width: 120px;">已付金额</td>
													<td style="width: 120px;">订单状态</td>
													<td style="width: 150px;">操作</td>
												</tr>
											</tbody>
										</table>

										<table cellspacing="0" cellpadding="0" border="0"
											class="member_myorder-table">
											<c:forEach var="item" items="${allOrdersForm.allQxList}"
												varStatus="status">
												<tr class="member_myorder-table-sec">
													<td class="myorder-table-sec_td1" colspan="3">订单号：${item.orderId }</td>
													<td class="myorder-table-sec_td2" colspan="3">下单时间：${item.addTime }</td>
												</tr>
												<tr class="member_myorder-table-third">
													<td class="myorder-table_td1">

														<div class="myorder-table-third-cp">
															<div class="img_left fl">
																<a href="/darry_ring/87.html"> <img width="55"
																	height="55" src="resources/images/${item.picture }">
																</a>
															</div>
															<div class="img_right fr">
																<a href="/darry_ring/87.html">
																	<p>${item.goodName }</p>
																</a>

															</div>
														</div>

													</td>
													<td class="myorder-table_td2" style="width: 190px;">
														<div
															style="height: 55px; line-height: 55px; font-family: 微软雅黑;"
															class="myorder-table-third-cp">￥${item.totalPrice }
														</div>

													</td>

													<td class="myorder-table_td3" style="font-family: 微软雅黑;">￥0</td>
													<td class="myorder-table_td5">未处理</td>
													<td class="myorder-table_td6" style="width: 120px;">

														<p style="cursor: pointer">
																	<a onClick="cancelOrder(${item.orderId })">取消订单</a>
																</p>
													</td>
												</tr>
											</c:forEach>
										</table>


									</div>
								</div>

							</div>

						</div>
						<!--我的订单end-->
					</div>
					<!--右边的主要内容end-->
				</div>

			</div>
		</div>

	</div>


	<div class="model" id="model">
		<div class="Prompt" id="Prompt"></div>
		<span id="log_uid" style="display: none"></span> <span id="log_uname"
			style="display: none"></span> <span id="log_orderid"
			style="display: none"></span> <span id="log_price"
			style="display: none"></span>

	</div>
	<script src="http://wpa.b.qq.com/cgi/wpa.php" charset="utf-8"
		type="text/javascript"></script>
	<!--客服(2014年8月29日)-->
	<div style="display: none" class="Ffloat_kf">
		<div class="fkf_top">
			<div style="cursor: pointer; display: none;" id="bridgehead"></div>
			<div id="BizQQWPA"></div>
			<div onClick="showModel(modelsever);" style="cursor: pointer;"
				class="qq_hover" id="qqTalk_head"></div>
			<div id="BizQQWPAB" class="sh"></div>

			<div id="bdBridge">
				<a href="javascript:NTKF.im_openInPageChat()"> <img width="75"
					height="37" src="resources/images/zx.jpg"></a>
			</div>

		</div>
		<div class="fkf_bottom">
			<img width="92" height="82" alt="Darry Ring 官方微信"
				src="resources/images/to_erwei.jpg"> <a href="#"> <img
				width="92" height="26" src="resources/images/db.jpg"></a>
		</div>
	</div>

	<!--返回顶部-->
	<div class="comeback"></div>
	<!--返回顶部end-->
	<spring:url value="/resources/js/orderlist.js" var="orderlistJs" />
	<script src="${orderlistJs}"></script>

	<script type="text/javascript" language="javascript">
		function deleteOrder(orderid) {
		 if (confirm("确定要取消订单吗?")) {
			window.location.href = "/member/myorder.aspx?action=delete&orderid=" + orderid;    
			 }									        
		}
	</script>

	<script type="text/javascript">
    function showbox(id) {
        getQeestion(id);
        for (var i = 1; i <= 8; i++) {
            if (i == id) {
                showdiv(id);
            }
            else {
                hidediv(i);
            }
        } 
    }
    function contenttxt(id, sid) {
        for (var i = 1; i <= 7; i++) {
            if (i == id) {
                showtxt(id, sid);
            }
            else {
                hidetxt(i, sid);
            }
        }


    }
    function showtxt(id, sid) {
        var objtitle = $("#content_title" + id + "_" + sid);

        if (objtitle.css("display") == "none") {
            objtitle.show("fast");
        }
        else {

            hidetxt(id, sid);
        }
        //$("#"+id).show("fast");
    }
    function hidetxt(id, sid) {
        var objtitle = $("#content_title" + id + "_" + sid);
        objtitle.hide("fast");
    }
    function hidediv(id) {
        $("#box" + id).hide("fast");

        $("#li" + id).css({ "font-size": "14px", "color": "#7d7d7d" });
    }

    function showdiv(id) {
        if ($("#box" + id).css("display") == "none") {
            $("#box" + id).show("fast");
            $("#li" + id).css({ "font-size": "18px", "color": "#000000" });
        }

    }

</script>
	<script type="text/javascript">
    function showMask() {
        $("#masks").css("height", $(document).height());
        $("#masks").css("width", $(document).width());
        $("#masks").fadeIn();
    }
    function showModel(divName) {
        showMask();
       /* var top = ($(window).height() - $(divName).height()) / 5;
        var left = ($(window).width() - $(divName).width()) / 2;
        var scrollTop = $(document).scrollTop();
        var scrollLeft = $(document).scrollLeft();*/
        $(divName).fadeIn();
    }
    function CloseMaskser() {

        $("#modelsever").fadeOut("slow");
        $("#masks").fadeOut("slow");
        $("#mask").fadeOut("slow");
    }

</script>


</body>
</html>